LS Securities OpenAPI for AI assistants.
Query Korean stock quotes, order books, charts, indicators, ETF holdings, market screeners, index context, analyst opinions, short-selling trends, and local portfolio notes from Claude Desktop, Claude Code, VS Code, Codex, or any MCP-compatible client.
⚠️ Unofficial third-party server. Not affiliated with or endorsed by LS Securities Co., Ltd.
This server is for information retrieval and local portfolio notes. It does not place trades or sync brokerage accounts.
Get Started
1. Get LS OpenAPI keys
Log in to openapi.ls-sec.co.kr with your LS Securities account, apply for OpenAPI access, then create an AppKey / AppSecretKey from MY > API Key 관리.
2. Configure your MCP client
Example for Claude Desktop:
{
"mcpServers": {
"lsopenapi": {
"command": "dnx",
"args": ["RedoxNet.Mcp.LsOpenApi", "--yes"],
"env": {
"LS_APPKEY": "<YOUR_LS_APPKEY>",
"LS_APPSECRETKEY": "<YOUR_LS_APPSECRETKEY>",
"LS_MARKET": "real"
}
}
}
}
dnx requires .NET SDK 10 or later.
3. Try a prompt
"Show me Samsung Electronics' current quote and 10-level order book."
"Pull SK Hynix daily, weekly, and monthly charts with MA20 and RSI."
"Find today's top trading-value stocks and analyze the strongest one."
"Show my holdings in the semiconductor industry."
"What are recent analyst opinion changes for Samsung Electronics?"
What You Can Ask
Quotes and Stock Lookup
- Current price and 10-level order book for a single Korean stock
- Multi-quote comparison for up to 50 stocks
- Company name to ticker lookup across KOSPI / KOSDAQ
- Company profile, PER / PBR / EPS, quarterly financials, foreign ownership, top brokers, 52-week and YTD ranges
Charts and Technical Analysis
- Daily / weekly / monthly / yearly / minute / tick OHLCV candles
- Multi-timeframe charts in one call
- SMA, EMA, RSI, MACD, Bollinger Bands, ZigZag swing context
- Token-efficient summaries and dataset handles for follow-up chart work
- Optional Plotly chart specs for MCP clients that support inline rendering
Market Context and Screeners
- KOSPI / KOSDAQ / KOSPI200 / KRX100 snapshots and history
- Industry index rankings and stocks inside an industry
- LS theme stocks and stock-to-theme lookup
- Top gainers / losers / market-cap / volume / trading-value / volume-surge screens
- Fundamentals ranking by PER, PBR, ROE, EPS, BPS, growth metrics, debt ratio, and retained earnings ratio
- Investor flow, market warnings, corporate events, new highs / lows
- Overseas index / FX / futures snapshots, including aliases such as NASDAQ, S&P 500, Dow, SOXX, USD/KRW, WTI, and gold
ETF / ETN
- ETF snapshot: NAV, tracking index, premium / discount, AUM, LPs
- ETF constituent holdings with weights, market value, cash, and bond components
- Optional Plotly treemap for supported clients
Local Portfolio Notes
- Track accounts, holdings, watchlists, and watched LS themes locally
- Buy / sell / set holdings manually with weighted average cost
- Apply local corporate actions such as split, reverse split, and bonus issue
- Filter holdings by theme or FICS industry
- Export / import a local JSON portfolio backup
Portfolio data is stored only on your machine in SQLite. It is not synced with LS Securities and does not represent live brokerage account state.
Credential Safety
LS_APPKEY and LS_APPSECRETKEY are accepted only through environment variables. They are never requested through chat, tool arguments, or MCP elicitation.
Access tokens are cached locally, but the token cache key stores only SHA256(appkey):market; raw AppKey and AppSecretKey are not written to disk. Logs and errors mask secrets.
Tool Surface
The server exposes curated semantic tools such as:
ls_search_stockls_get_quotels_get_multi_quotels_get_stock_infols_get_chartls_get_top_stocksls_get_index_quotels_get_index_historyls_get_industry_indicesls_get_theme_stocksls_get_fundamentals_rankls_get_investor_flowls_get_etf_infols_get_etf_holdingsls_holdings_list
It also includes TR catalog tools for advanced users: ls_search_tr, ls_describe_tr, and ls_call_tr.
For full setup instructions, host-specific config snippets, complete tool schemas, response examples, and release notes, see the GitHub repository.
Server Config
{
"mcpServers": {
"lsopenapi": {
"command": "dnx",
"args": [
"RedoxNet.Mcp.LsOpenApi",
"--yes"
],
"env": {
"LS_APPKEY": "<YOUR_LS_APPKEY>",
"LS_APPSECRETKEY": "<YOUR_LS_APPSECRETKEY>",
"LS_MARKET": "real"
}
}
}
}